/*
 * RotationObject.h
 *
 *  Created on: 04.10.2012
 *      Author: caffeine
 */

#ifndef ROTATIONOBJECT_H_
#define ROTATIONOBJECT_H_

#include <thread/IMutex.h>
#include <vector3d.h>
#include <ISerializationObject.h>

namespace irr{
namespace object{

class RotationObject:public virtual ISerializationObject {
private:
	irr::core::vector3df rotation;
	irr::thread::IMutex*rotation_lock;
protected:
	virtual irr::core::stringc getSerializationNodeName()=0;
public:
	RotationObject();
	RotationObject(irr::core::vector3df rotation);
	RotationObject(irr::f32 X,irr::f32 Y,irr::f32 Z);
	virtual ~RotationObject();

	virtual irr::core::vector3df getRotation();
	virtual irr::f32 getRotationX();
	virtual irr::f32 getRotationY();
	virtual irr::f32 getRotationZ();

	virtual void setRotation(irr::core::vector3df position);
	virtual void setRotation(irr::f32 X,irr::f32 Y,irr::f32 Z);

	virtual void setRotationX(irr::f32 X);
	virtual void setRotationY(irr::f32 Y);
	virtual void setRotationZ(irr::f32 Z);
	virtual void rotateX(irr::f32 X);
	virtual void rotateY(irr::f32 Y);
	virtual void rotateZ(irr::f32 Z);
	
	virtual void getSerialized(irr::xml::IXmlNode*node);
	virtual irr::xml::TagResult setSerialized(irr::xml::IXmlNode*node);
};

}//namespace object
}//namespace irr

#endif /* ROTATIONOBJECT_H_ */
